import React from "react"
import { Text, Button, View } from "@tarojs/components"
import clsx from "clsx"
import { navigation } from "@/utils/router"
import { pageMapper } from "@/constants/pageMap"
import styles from "./index.module.scss"

type IProps = {
  className?: string
  showContactBtn?: boolean
}
/** 你想要知道的都在这里 */
const GpContactTip: React.FC<IProps> = (props: IProps) => {
  const { className, showContactBtn = true } = props
  function handleJumpConsult() {
    navigation(pageMapper.external, null)
  }
  return (
    <View className={clsx("px-24px py-32px bg-hex-f8f8f8 rounded-12px box-border", className)}>
      <Text className="yahei font-normal leading-40px text-26px text-hex-666">
        想要获取更多艺考资讯 | 机构咨询 | 招生信息 | 报考建议点击右下在线
        <Text className="text-hex-ff3221">咨询</Text>
      </Text>
      <View className="flex flex-row items-center justify-between h-78px box-border">
        <Text className="yahei font-normal text-24px text-hex-b8b8bf">你想要知道的都在这里</Text>
        {showContactBtn ? (
          <Button onClick={handleJumpConsult} className={clsx("yahei-ui", styles["consult-btn"])}>
            在线咨询
          </Button>
        ) : null}
      </View>
    </View>
  )
}
export default GpContactTip
